import request from '@/router/axios';

export const getList = (current, size, params) => {
  return request({
    url: '/api/rb-oem/oem/active/activerecord/debtList',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}

export const add = (row) => {
  return request({
    url: '/api/rb-oem/oem/active/activerecord/addDebt',
    method: 'post',
    data: row
  })
}

export const getListCount = (params) => {
  return request({
    url: '/api/rb-oem/oem/active/activerecord/debtStatistics',
    method: 'get',
    params: {
      ...params
    }
  })
}


export const getExport = (params) => {
  return request({
    /*headers: {
      "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
    },
    responseType: 'blob',*/
    url: '/api/rb-oem/oem/active/activerecord/debtExport',
    method: 'get',
    params: {
      ...params
    }
  })
}

/* 导出模板 */
export const getExportTemplate = (params) => {
  return request({
    headers: {
      "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
    },
    responseType: 'blob',
    url: '/api/rb-oem/oem/active/activerecord/export-template',
    method: 'get',
    params: {
      ...params,
    }
  })
}
